﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mappings;

namespace Apollo.Modules.Salary
{
    [NHibernateEntity(Table = "AccountingMonths")]
    public class AccountingMonth : ITrackable
    {
        public AccountingMonth() { }

        [PrimaryKey]
        public virtual int Id { get; set; }

        [Property]
        public virtual string Name { get; set; }
        
        [Property]
        public virtual int Month { get; set; }
        
        [Property]
        public virtual int Year { get; set; }

        [Property]
        public virtual DateTime FirstDay { get; set; }

        [Property]
        public virtual DateTime LastDay { get; set; }
        
        [Property]
        public virtual bool IsClosed { get; set; }



        [BelongsTo(Column = "ID_Prev_AccountingMonth")]
        public virtual AccountingMonth Prev { get; set; }

        [BelongsTo(Column = "ID_Next_AccountingMonth")]
        public virtual AccountingMonth Next { get; set; }



        [Property]
        public virtual DateTime InsertDate { get; set; }

        [Property]
        public virtual string InsertBy { get; set; }

        [Property]
        public virtual DateTime? ModifiedDate { get; set; }

        [Property]
        public virtual string ModifiedBy { get; set; }
    }

}
